package com.cherry.ssm.user.service;


import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.oltu.oauth2.common.exception.OAuthSystemException;
import org.springframework.http.HttpEntity;

import com.cherry.ssm.user.model.SsoUser;


public interface UserService {
	
	
	/**
	 * 登陆接口
	 * 1、客户端之前验证接入权限的时候获取的客户端本地的ip
	 * 2、判断是否登陆成功
	 * 3、根据登陆账号loginId来判断是否缓存,如果缓存则修改,如果没缓存则添加
	 * 4、重定向到客户端接口或者登陆失败页
	 */
	public String login(SsoUser users,HttpServletRequest request , HttpServletResponse response, HttpSession session) throws OAuthSystemException;
	
	/**
	 * 通过code获取token
	 * 通过token获取loginId
	 */
    public HttpEntity getloginId(HttpServletRequest request, HttpSession session);
    
//    /**
//	 * 通过token获取loginId
//	 * 登陆拦截里面的
//	 */
//    public HttpEntity interceptgetloginId(HttpServletRequest request, HttpSession session);
    
	/**
	 * 退出登陆
	 */
	public String loginout(HttpServletRequest request, HttpServletResponse response, HttpSession session);
	
	
	
    
}
